package org.ztr.yanai.blog.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.ztr.yanai.blog.enums.PostStatusEnum;

import java.time.LocalDateTime;

/**
 * @Author: ZhaoTR
 * @Date: Created in 2025/11/22 14:30
 * @Description: 文章数据传输对象，包含作者信息
 * @Version: 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "文章信息DTO")
public class PostDTO {

    @Schema(description = "文章ID")
    private Long id;

    @Schema(description = "文章标题")
    private String title;

    @Schema(description = "文章内容")
    private String content;

    @Schema(description = "作者ID")
    private Long userId;

    @Schema(description = "作者名称")
    private String authorName;

    @Schema(description = "作者头像")
    private String authorAvatar;

    @Schema(description = "文章状态")
    private PostStatusEnum status;

    @Schema(description = "浏览次数")
    private Integer views;

    @Schema(description = "点赞次数")
    private Integer likes;

    @Schema(description = "创建时间")
    private LocalDateTime createdAt;

    @Schema(description = "更新时间")
    private LocalDateTime updatedAt;
}
